package com.xsdl.flyweight.txt;

import java.util.List;

public class Main {

    public static void main(String[] args) {
        List<Word> wordList = List.of(
                new Word('A', FontFactory.getInstance().getFont("Arial", 12)),
                new Word('B', FontFactory.getInstance().getFont("Arial", 14)),
                new Word('C', FontFactory.getInstance().getFont("Arial", 16)),
                new Word('D', FontFactory.getInstance().getFont("Arial", 18)),
                new Word('E', FontFactory.getInstance().getFont("Arial", 12))
        );
        System.out.println(wordList.get(0).getFont().equals(wordList.get(4).getFont()));
        System.out.println(wordList.get(0).getFont() == (wordList.get(4).getFont()));


        Integer a = 1;
        Integer b = 1;
        System.out.println(a == b);
    }

}
